package com.example.firstapp;

import android.app.Activity;
import android.os.Bundle;
import android.os.Message;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;

public class MainActivity extends Activity {

	public static final String EXTRA_MESSAGE = "com.example.FirstApp.MESSAGE";

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		MenuInflater inFlater = getMenuInflater();
		inFlater.inflate(R.menu.main, menu);
		return super.onCreateOptionsMenu(menu);
	}

	public void sendMessage(View view) {
		Message.obtain();
//		Intent intent = new Intent(this, DisplayMessageActivity.class);
//		EditText editText = (EditText) findViewById(R.id.edit_message);
//		String message = editText.getText().toString();
//		intent.putExtra(EXTRA_MESSAGE, message);
//		startActivity(intent);
	}
	
	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case R.id.action_search:
//			openSearch();
			return true;
		case R.id.action_settings:
//			openSettings();
			return true;
		default:
			return super.onOptionsItemSelected(item);
		}
	}
}
